unit umodules;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ButtonPanel,
  StdCtrls;

type

  { TModulesForm }

  TModulesForm = class(TForm)
    ButtonPanel1: TButtonPanel;
    ListBox1: TListBox;
    procedure FormActivate(Sender: TObject);
    procedure ListBox1DblClick(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  ModulesForm: TModulesForm;

implementation
 uses umain,umoduledit;
{$R *.lfm}

{ TModulesForm }

procedure TModulesForm.ListBox1DblClick(Sender: TObject);
begin
 Form1.OpenDialog1.FileName:=LowerCase(ListBox1.Items[ListBox1.ItemIndex]);
 isOk:=false;
 Form1.Edit1.Text:=INI.ReadString('MODULES',ListBox1.Items[ListBox1.ItemIndex],'');
 Form1.ShowModal;
 if isOK then INI.WriteString('MODULES',ListBox1.Items[ListBox1.ItemIndex],Form1.Edit1.Text);
end;

procedure TModulesForm.FormActivate(Sender: TObject);
begin
 INI.ReadSection('MODULES',ListBox1.Items);
end;

end.

